﻿using System;
using System.Threading;
using System.Threading.Tasks;


namespace Sustainalytics.LongRunningTaskManager.Interface
{
    public interface ILongRunningTaskInstanceAsyncInfo
    {
        Task<ILongRunningTaskResult> ManagedTask { get; }

        CancellationToken TaskCancellationToken { get; }

        void WaitForStatus(LongRunningTaskInstanceStatusEnum taskStatus);
        void WaitForStatus(LongRunningTaskInstanceStatusEnum taskStatus, int millisecondsTimeout);
        void WaitForStatus(LongRunningTaskInstanceStatusEnum taskStatus, TimeSpan timeout);
    }
}
